import request from "@/utils/request";

// 查询物料入仓列表
export function listInStorehouse(query) {
  return request({
    url: "wh/inStorehouse/list",
    method: "get",
    params: query,
  });
}
// 查询物料列表
export function getOrderList(query) {
  return request({
    url: "prod/workOrder/list",
    method: "get",
    params: query,
  });
}

// 查询物料入仓详细
export function getInStorehouse(id) {
  return request({
    url: "wh/inStorehouse/" + id,
    method: "get",
  });
}

// 新增物料入仓
export function addInStorehouse(data) {
  return request({
    url: "wh/inStorehouse",
    method: "post",
    data: data,
  });
}

// 修改物料入仓
export function updateInStorehouse(data) {
  return request({
    url: "wh/inStorehouse",
    method: "put",
    data: data,
  });
}

// 删除物料入仓
export function delInStorehouse(id) {
  return request({
    url: "wh/inStorehouse/" + id,
    method: "delete",
  });
}
// 物料入仓确认
export function confirmInStorehouse(data) {
  return request({
    url: `wh/inStorehouse/confirmInWarehouse`,
    method: "post",
    data,
  });
}
// 进出场记录
export function warehouseRecord(params) {
  return request({
    url: `wh/record/list`,
    method: "get",
    params,
  });
}
export function getInHouseMatList(params) {
  return request({
    url: `wh/inStorehouse/selectInStorehouseList`,
    method: "get",
    params,
  });
}
export function syncERPInWh() {
  return request({
    url: `wh/inStorehouse/syncERPInWh`,
    method: "get",
  });
}
